package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    void publish(Movement movement);

    //查询个人动态
    PageResult findByUserId(Long userid, Integer page, Integer pagesize);

    //查询好友的所有动态
    List<Movement> findFriendMovements(Long userId, Integer page, Integer pagesize);

    //根据pid查询动态
    List<Movement> findMovementsByPids(List<Long> pids);

    //随机推荐一页动态
    List<Movement> randomMovements(Integer pagesize);

    //根据id查询动态
    Movement findById(String movementId);

    //发布评论，并获取评论数量
    Integer save(Comment comment1);

    //是否点赞
    Boolean hasLike(String movementId, Long userId, CommentType like);

    //删除
    Integer delete(Comment comment);

}
